<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title><%= htmlWebpackPlugin.options.title %></title>

		<% htmlWebpackPlugin.files.css.forEach(function (path) { %>
		<link rel='stylesheet' type='text/css' href='/<%= path %>' />
		<% }); %>

		<script type="text/javascript">
			var _gaq = _gaq || [];
			_gaq.push(['_setAccount', 'UA-29161571-1']);
			_gaq.push(['_trackPageview']);

			(function() {
				var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
				ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
				var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
			})();
		</script>
	</head>
	<body>
		<div id='header'>
			<h1><%= htmlWebpackPlugin.options.title %></h1>
		</div>

		<div id='application'></div>

		<div id='javascript'>
			<% htmlWebpackPlugin.files.js.forEach(function (path) { %>
			<script type='application/javascript' src='/<%= path %>'></script>
			<% }); %>

			<script type='text/javascript'>
				$(function(){
					($('a[rel=external]')).click(function(e) {
						var link;
						e.preventDefault();
						window.open(($(e.currentTarget)).attr('href'));
						link = $(e.currentTarget);
						return _gat._getTrackerByName()._trackEvent(link.attr('data-track-category'), link.attr('href'));
					});
				});
			</script>
		</div>

		<a href="http://github.com/jvatic/FluxType" id='fork-github' rel='external' data-track-category='Github'><img style="position: absolute; top: 0; left: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_left_darkblue_121621.png" alt="Fork me on GitHub"></a>
	</body>
</html>
